package com.government.sequence.key;

import cn.hutool.core.util.StrUtil;


public class SequenceKeyGenerator extends BaseKeyGenerator {

    private String key;

    public SequenceKeyGenerator(String prefix) {
        super(prefix);
    }

    private SequenceKeyGenerator(long expireSeconds, String prefix) {
        super(expireSeconds, prefix);
    }


    public SequenceKeyGenerator buildKey(String key) {
        this.key = key;
        return this;
    }

    @Override
    public String getKey() {
        return super.getKey() + StrUtil.COLON + key;
    }


    public static SequenceKeyGenerator OUT_TRADE_NO() {
        return new SequenceKeyGenerator(100, "PAY");
    }

    public static SequenceKeyGenerator VIP_ORDER_NO() {
        return new SequenceKeyGenerator(100, "VIP");
    }

    public static SequenceKeyGenerator VC_KEY() {
        return new SequenceKeyGenerator(100, "verCode");
    }

    public static SequenceKeyGenerator VC_LIMIT_KEY() {
        return new SequenceKeyGenerator(100, "verCode");
    }


}
